Technical Field
This disclosure relates to update or restoration of a basic input/output system of a computer system, and particularly to a circuit and a method for writing program codes of a basic input/output system without requiring the computer system to be in a power-on state.
Related Art
In a computer system, a basic input/output system (BIOS) is the indispensable firmware. Since the BIOS stores the most basic software program codes in the computer system, detection and linkage need be performed through the basic input/output system when any hardware of the computer system is enabled. Additionally, the modern BIOS program codes are usually stored in an erasable and writable storage unit, such as an EEPROM or a Flash ROM, and the program codes stored in the storage unit do not disappear when the computer system is shut down. Moreover, a new program code can be written to overwrite or restore an old program code by performing a specific burning program through the computer system. However, for this type of erasable and writable storage unit, the probability that data is damaged is relatively higher; for example, data is damaged by a computer virus or the writing is incomplete when the new program code is written. If as the BIOS program got damaged and it were not discovered in time, then the computer system proceeded to shut down or restart, which will result in the computer system incapable of entering the power-on state again. At this time, it cannot execute the specific burning program via the computer system to write the new program codes in order to overwrite or restore the old program codes.
In the prior art, the applicant has put forward a double-BIOS architecture, where two BIOSs both store program codes, thus being a backup for each other. When it is found that the program codes of one BIOS have been damaged, the other backup BIOS can be used to restore the program codes of the main BIOS. However, the situation that the two BIOSs are damaged at the same time and cannot be repaired is not excluded. At the same time, the mechanism that the double BIOSs are a backup for each other still needs the intervention of the computer system, that is, the computer system must maintain in the power-on state. If the computer system cannot be powered on, the damaged BIOS still cannot be repaired. In this case, a user still needs to deliver the computer system to a supplier for repair.